package com.bingxue.edu.management.system.model.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * 系统配置更新请求
 *
 * @author panbo
 * @since 2024/07/17
 */
@Data
@Schema(description = "系统配置更新请求")
public class ConfigReq {

    @Schema(description = "类别")
    @NotBlank(message = "类别不能为空")
    @Length(max = 32, message = "类别长度不能超过 {max} 个字符")
    private String category;

    @Schema(description = "编码")
    @NotBlank(message = "编码不能为空")
    @Length(max = 64, message = "编码长度不能超过 {max} 个字符")
    private String code;

    @Schema(description = "名称")
    @NotBlank(message = "名称不能为空")
    @Length(max = 64, message = "名称长度不能超过 {max} 个字符")
    private String name;

    @Schema(description = "值")
    @NotBlank(message = "值不能为空")
    @Length(max = 255, message = "值长度不能超过 {max} 个字符")
    private String value;

    @Schema(description = "默认值")
    @NotBlank(message = "默认值不能为空")
    @Length(max = 255, message = "默认值长度不能超过 {max} 个字符")
    private String defaultValue;

    @Schema(description = "是否为动态属性")
    @NotNull(message = "是否为动态属性")
    private Boolean dynamic;

    @Schema(description = "描述")
    @Length(max = 255, message = "描述长度不能超过 {max} 个字符")
    private String description;
}
